﻿using System;
using System.Runtime.InteropServices;
using Scenario.WorkflowEngine.DataModel.WorkflowServices;

namespace Scenario.WAPI
{
    public partial class Service
    {
        [DllImport("WAPI.dll", EntryPoint = "getServices", CharSet = CharSet.Ansi)]
        [return: MarshalAs(UnmanagedType.AnsiBStr)]
        private static extern String GetServices(ref Response response);

        [DllImport("WAPI.dll", EntryPoint = "getServiceForUser", CharSet = CharSet.Ansi)]
        [return: MarshalAs(UnmanagedType.AnsiBStr)]
        private static extern String GetServiceForUser(string sUser, ref Response response);

        [DllImport("WAPI.dll", EntryPoint = "getServicesForExtendedAttribute", CharSet = CharSet.Ansi)]
        [return: MarshalAs(UnmanagedType.AnsiBStr)]
        private static extern String GetServiceForUser(string sUser, string sAttributeName, string sAttributeValue, ref Response response);

        [DllImport("WAPI.dll", EntryPoint = "addService")]
        private static extern void AddService(string sService, ref Response response);

        [DllImport("WAPI.dll", EntryPoint = "deleteService")]
        private static extern void DeleteService(string sServiceName, ref Response response);
    }
}
